package com.budwk.app.miniapp.models;

import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.mvc.annotation.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * 社区活动主体表(SqfwRally)实体类
 *
 * @author makejava
 * @since 2023-11-06 11:25:15
 */
@Data
@Table("sqfw_rally")
@ApiModel(description = "社区活动主体表")
public class SqfwRally implements Serializable {
    private static final long serialVersionUID = 181433030412855561L;
    /**
     * 主键
     */
    @Name
    @Prev(els=@EL("$me.nextId()"))
    @Column(value ="id")
    private String id;
    /**
     * 活动标题
     */
    @Column(value ="rally_name")
    private String rallyName;
    /**
     * 活动内容
     */
    @Column(value ="rally_content")
    private String rallyContent;
    /**
     * 活动开始时间
     */
    @Column(value ="rally_start_time")
    private Date rallyStartTime;
    /**
     * 活动结束时间
     */
    @Column(value ="rally_end_time")
    private Date rallyEndTime;
    /**
     * 发布人姓名
     */
    @Column(value ="rally_release_user_name")
    private String rallyReleaseUserName;
    /**
     * 发布人id
     */
    @Column(value ="rally_release_user_id")
    private String rallyReleaseUserId;
    /**
     * 发布人单位
     */
    @Column(value ="rally_release_dept" )
    private String rallyReleaseDept;
    /**
     * 覆盖年龄
     */
    @Column(value ="rally_include_age")
    private String rallyIncludeAge;
    /**
     * 覆盖性别
     */
    @Column(value ="rally_include_sex")
    private String rallyIncludeSex;
    /**
     * 覆盖范围（特殊人员）
     */
    @Column(value ="rally_include_range")
    private String rallyIncludeRange;
    /**
     * 覆盖范围
     */
    @Column(value ="rally_include_area")
    private String rallyIncludeArea;
    /**
     * 参与人员手机号
     */
    @Column(value ="rally_join_user")
    private String rallyJoinUser;
    /**
     * 活动类型1:报名，2文章发布
     */
    @Column(value ="rally_type")
    private Integer rallyType;


    /**
     * 发布时间
     */
    @Column(value ="create_time")
    private Date createTime;


    /**
     * 报名条件
     */
    @Column(value ="conditions")
    private String conditions;

    @Column(value ="finish_status")
    private String finishStatus;


    @Column(value ="province")
    private String province;

    @Column(value ="city")
    private String city;

    @Column(value ="district")
    private String district;

    @Column(value ="county")
    private String county;

    @Column(value ="community")
    private String community;
    @Column("peo_limit")
    private String  peoLimit;

    @Column("full_range")
    private int  fullRange;

    private Integer signTimeoutFlag; //

    private Integer signUserFlag;

    private String phone;

    private int pageNo;
    private int pageSize;


    public String nextId() {
        return IdUtil.getSnowflake(1, 1).nextIdStr();

    }


}

